#ifndef CUBEEMITTER_H_
#define CUBEEMITTER_H_
#include "Cube.h"
#include "CubePile.h"
#include "Constants.h"

#include <GL/glu.h>
#include <vector>
using namespace std;


class CubeEmitter
{
	int maxEmitTime;
    int nextEmissionTime;
    int emissionsLeft;
    int timeSinceLastEmission;
	int randomInt(int max);
	void emit(int x, int z, CubePile * cubePile, GLuint topTextures[NUM_TEXTURES], GLuint sideTextures [NUM_TEXTURES]);
	public:
		CubeEmitter(int aMaxEmitTime, int aMaxEmissions);
		virtual ~CubeEmitter();
		void emit(float timeD, CubePile * cubePiles [][GRID_SIZE], GLuint topTextures[NUM_TEXTURES], GLuint sideTextures [NUM_TEXTURES]);
};


#endif /*CUBEEMITTER_H_*/
